<html>
<head><meta charset="utf-8"><title>impl&lt;T: MuseUse&gt; MustUse for Pin&lt;T&gt; · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html">impl&lt;T: MuseUse&gt; MustUse for Pin&lt;T&gt;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="196247189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196247189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196247189">(May 04 2020 at 22:23)</a>:</h4>
<p>Hi! Just letting interested folks know that I'm working on making the <code>#[must_use]</code> lint driven by implementations of a new <code>MustUse</code> trait. This could solve some async/await diagnostic issues such as <a href="https://github.com/rust-lang/rust/issues/67387" title="https://github.com/rust-lang/rust/issues/67387">#67387</a> and <a href="https://github.com/rust-lang/rust/issues/71368" title="https://github.com/rust-lang/rust/issues/71368">#71368</a>. The PR is <a href="https://github.com/rust-lang/rust/issues/71816" title="https://github.com/rust-lang/rust/issues/71816">#71816</a>.</p>



<a name="196288213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196288213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196288213">(May 05 2020 at 10:01)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> I'm trying to remember where I landed on using the trait system for this. I remember feeling fairly negative about it.</p>



<a name="196288220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196288220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196288220">(May 05 2020 at 10:01)</a>:</h4>
<p>But maybe I reconciled myself to it.</p>



<a name="196288369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196288369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196288369">(May 05 2020 at 10:03)</a>:</h4>
<p>OK, reading the comments I see I did not. I stand by those concerns. I don't love the idea of introducing a trait whose only purpose is to inform the lint system, and shouldn't really be used by users like other traits. (Unless it's an impl detail...)</p>



<a name="196288416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196288416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196288416">(May 05 2020 at 10:03)</a>:</h4>
<p>Though I suppose that the alternative for <code>Option</code> and friends is that we have to distinguish <code>MustUse</code> for result (where it is true regardless of the parameters) versus a "recursive" variant.</p>



<a name="196288475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/impl%3CT%3A%20MuseUse%3E%20MustUse%20for%20Pin%3CT%3E/near/196288475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/impl.3CT.3A.20MuseUse.3E.20MustUse.20for.20Pin.3CT.3E.html#196288475">(May 05 2020 at 10:04)</a>:</h4>
<p>I'll think about it :) seems like a weird precedent to me still</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>